Platform Explorer / Nuxeo Platform 2021.59

Component org.nuxeo.ecm.directory.multi.MultiDirectoryFactory

Documentation

Multi-directory implementation.

Requirements

Resolution Order

810
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

847
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.

Implementation

Class: org.nuxeo.ecm.directory.multi.MultiDirectoryFactory

Extension Points

XML Source

<?xml version='1.0' encoding='UTF-8'?>
<component name="org.nuxeo.ecm.directory.multi.MultiDirectoryFactory">

  <implementation class="org.nuxeo.ecm.directory.multi.MultiDirectoryFactory"/>

  <require>org.nuxeo.ecm.directory.DirectoryServiceImpl</require>

  <documentation>Multi-directory implementation.</documentation>

  <extension-point name="directories">
    <object class="org.nuxeo.ecm.directory.multi.MultiDirectoryDescriptor"/>
    <object class="org.nuxeo.ecm.directory.multi.SourceDescriptor"/>
    <object class="org.nuxeo.ecm.directory.multi.SubDirectoryDescriptor"/>
    <object class="org.nuxeo.ecm.directory.multi.FieldDescriptor"/>

    <documentation>
      This extension point can be used to register new
      multi-directories. The extension can contain any number of
      directories declarations of the form:

      <code>
        ...
        <directory name="userDirectory">
          <schema>user</schema>
          <idField>username</idField>
          <passwordField>password</passwordField>

          <querySizeLimit>1000</querySizeLimit>

          <source name="ldapusers">
            <subDirectory name="authinfo">
              <field for="email">mail</field>
            </subDirectory>
            <subDirectory name="userinfo">
              <field for="firstName">givenName</field>
              <field for="lastName">sn</field>
              <field for="company">o</field>
            </subDirectory>
          </source>

          <source name="sqlusers" creation="true">
            <subDirectory name="sqlUserDirectory"/>
          </source>

        </directory>
        ...
      </code>

      Here is the description for each field:
      <ul>
        <li>
          schema - the name of the schema to be used for the directory
          entries.
        </li>
        <li>
          idField - the id field designs the primary key in the table,
          used for retrieving entries by id.
        </li>
        <li>
          querySizeLimit - the maximum number of results that the
          queries on this directory should return; if there are more
          results than this, an exception will be raised.
        </li>
      </ul>
      The references tag is used to define relations between
      directories. (TODO: describe the references types.)
    </documentation>
  </extension-point>

</component>